package com.tamecode.bean.di;

public class CarFactory {

    // ①创建Car的工厂方法
    public Car createHongQiCar() {
        Car car = new Car();
        car.setBrand("BYD");
        return car;
    }

    // 工厂方法是静态的
    public static Car createBydCar() {
        Car car = new Car();
        car.setBrand("BYD");
        return car;
    }


}
